<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * is_logged_in Filename
 *
 * @access	public
 * @param	string
 * @return	string
 */
if ( ! function_exists('is_logged_in'))
{
	function is_logged_in($value=array())
	{
		$CI =& get_instance();
        return $user = $CI->session->userdata($value);
        /*if ($user)
            return true; 
        else 
            return false; */
	}
}

/**
 * is_register_in Filename
 *
 * @access	public
 * @param	string
 * @return	string
 */
if ( ! function_exists('is_register'))    
{
    function is_register($value=array())
    {
        $CI =& get_instance();
        return $CI->session->set_userdata($value);  
    }
}

/**
 * auth_user_in Filename
 *
 * @access	public
 * @param	string
 * @return	string
 */
if ( ! function_exists('user_auth'))    
{
    function user_auth($value)
    {
        $CI =& get_instance();
        return $CI->session->userdata($value);  
    }
}

/**
 * is_logged_out Filename
 *
 * @access	public
 * @param	string
 * @return	string
 */
 if ( ! function_exists('is_logged_out'))
{
	function is_logged_out()
	{
		$CI =& get_instance();
        return $CI->session->sess_destroy(); 
	}
}